Optimal. Leaf size=62 \[ \frac {b \log (x)}{a^2+1}-\frac {b \log \left ((a+b x)^2+1\right )}{2 \left (a^2+1\right )}-\frac {a b \tan ^{-1}(a+b x)}{a^2+1}-\frac {\tan ^{-1}(a+b x)}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.700, Rules used = {5045, 371, 706, 31, 635, 203, 260} \[ \frac {b \log (x)}{a^2+1}-\frac {b \log \left ((a+b x)^2+1\right )}{2 \left (a^2+1\right )}-\frac {a b \tan ^{-1}(a+b x)}{a^2+1}-\frac {\tan ^{-1}(a+b x)}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 203
Rule 260
Rule 371
Rule 635
Rule 706
Rule 5045
Rubi steps
\begin {align*} \int \frac {\tan ^{-1}(a+b x)}{x^2} \, dx &=-\frac {\tan ^{-1}(a+b x)}{x}+b \int \frac {1}{x \left (1+(a+b x)^2\right )} \, dx\\ &=-\frac {\tan ^{-1}(a+b x)}{x}+b \operatorname {Subst}\left (\int \frac {1}{(-a+x) \left (1+x^2\right )} \, dx,x,a+b x\right )\\ &=-\frac {\tan ^{-1}(a+b x)}{x}+\frac {b \operatorname {Subst}\left (\int \frac {1}{-a+x} \, dx,x,a+b x\right )}{1+a^2}+\frac {b \operatorname {Subst}\left (\int \frac {-a-x}{1+x^2} \, dx,x,a+b x\right )}{1+a^2}\\ &=-\frac {\tan ^{-1}(a+b x)}{x}+\frac {b \log (x)}{1+a^2}-\frac {b \operatorname {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,a+b x\right )}{1+a^2}-\frac {(a b) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,a+b x\right )}{1+a^2}\\ &=-\frac {a b \tan ^{-1}(a+b x)}{1+a^2}-\frac {\tan ^{-1}(a+b x)}{x}+\frac {b \log (x)}{1+a^2}-\frac {b \log \left (1+(a+b x)^2\right )}{2 \left (1+a^2\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.06, size = 67, normalized size = 1.08 \[ -\frac {\tan ^{-1}(a+b x)}{x}+\frac {b (i (a+i) \log (-a-b x+i)+(-1-i a) \log (a+b x+i)+2 \log (x))}{2 \left (a^2+1\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.41, size = 57, normalized size = 0.92 \[ -\frac {b x \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right ) - 2 \, b x \log \relax (x) + 2 \, {\left (a b x + a^{2} + 1\right )} \arctan \left (b x + a\right )}{2 \, {\left (a^{2} + 1\right )} x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 63, normalized size = 1.02 \[ -\frac {\arctan \left (b x +a \right )}{x}+\frac {b \ln \left (b x \right )}{a^{2}+1}-\frac {b \ln \left (1+\left (b x +a \right )^{2}\right )}{2 \left (a^{2}+1\right )}-\frac {a b \arctan \left (b x +a \right )}{a^{2}+1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 77, normalized size = 1.24 \[ -\frac {1}{2} \, b {\left (\frac {2 \, a \arctan \left (\frac {b^{2} x + a b}{b}\right )}{a^{2} + 1} + \frac {\log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{a^{2} + 1} - \frac {2 \, \log \relax (x)}{a^{2} + 1}\right )} - \frac {\arctan \left (b x + a\right )}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.04, size = 63, normalized size = 1.02 \[ -\frac {\mathrm {atan}\left (a+b\,x\right )}{x}-\frac {\frac {b\,x\,\ln \left (a^2+2\,a\,b\,x+b^2\,x^2+1\right )}{2}-b\,x\,\ln \relax (x)+a\,b\,x\,\mathrm {atan}\left (a+b\,x\right )}{x\,\left (a^2+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 1.89, size = 168, normalized size = 2.71 \[ \begin {cases} - \frac {i b \operatorname {atan}{\left (b x - i \right )}}{2} - \frac {\operatorname {atan}{\left (b x - i \right )}}{x} - \frac {i}{2 x} & \text {for}\: a = - i \\\frac {i b \operatorname {atan}{\left (b x + i \right )}}{2} - \frac {\operatorname {atan}{\left (b x + i \right )}}{x} + \frac {i}{2 x} & \text {for}\: a = i \\- \frac {2 a^{2} \operatorname {atan}{\left (a + b x \right )}}{2 a^{2} x + 2 x} - \frac {2 a b x \operatorname {atan}{\left (a + b x \right )}}{2 a^{2} x + 2 x} + \frac {2 b x \log {\relax (x )}}{2 a^{2} x + 2 x} - \frac {b x \log {\left (a^{2} + 2 a b x + b^{2} x^{2} + 1 \right )}}{2 a^{2} x + 2 x} - \frac {2 \operatorname {atan}{\left (a + b x \right )}}{2 a^{2} x + 2 x} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________